package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.BankAccountResDTO;
import com.jzo2o.customer.model.dto.response.ResponseDTO;
import com.jzo2o.customer.service.IWorkBankService;
import com.jzo2o.customer.service.WorkRejectReasonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 86188
 */

@RestController("WorkWorkBankController")
@RequestMapping("/worker/bank-account")
@Api(tags = "服务端 - 服务人员相关接口")
public class WorkBankController {
    @Resource
    private IWorkBankService workBankService;
    /**
     * 新增或更新银行账户信息
     *
     * */
    @PostMapping
    @ApiOperation("新增或更新银行账户信息接口")
    public void addOrUpdate(@RequestBody BankAccountUpsertReqDTO bankaccounDTO) {
      workBankService.addOrUpdate(bankaccounDTO);
    }
    @GetMapping ("currentUserBankAccount")
    @ApiOperation("获取当前用户银行账户信息")
    public BankAccountResDTO currentUserBankAccount() {
        return workBankService.currentUserBankAccount();
    }


}
